import request from '@/utils/request'
// 获取月卡列表
export function getCardList(params) {
  return request({
    url: '/parking/card/list',
    method: 'get',
    params
  })
}
// 添加月卡
export function createCard(data) {
  return request({
    url: '/parking/card',
    method: 'post',
    data
  })
}
// 编辑月卡详情
export function getCardDetail(id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}
// 编辑月卡
export function editCard(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data
  })
}
// 删除月卡
export function delCard(id) {
  return request({
    url: `/parking/card/${id}`,
    method: 'delete'
  })
}
// 批量删除月卡
export function delCardList(idList) {
  return request({
    url: `/parking/card/${idList.join(',')}`,
    method: 'DELETE'
  })
}
// 获取规则列表
export function getRuleList(params) {
  return request({
    url: 'parking/rule/list',
    params
  })
}
// 添加规则
export function createRule(data) {
  return request({
    url: '/parking/rule',
    method: 'post',
    data
  })
}
